<!-- _ch_ headers are for challenge statuses -->
<!-- this is for viewing the details of a challenge sent by the user -->
<%=link_to "see details","#",:clicktoshowdialog=>"accept_dialog_" + ch.id.to_s%> 
    <%fb_dialog "accept_dialog_" + ch.id.to_s,1 do %>
    <%=fb_dialog_title "Challenge Details"%>
    <%fb_dialog_content do%>
       <form id="my_form">
		   <table>
			   <tr><td class='dialog-text'>From:</td><td><%=ch.sender.name%></td></tr>
			   <tr><td class='dialog-text'>Match:</td><td><%=ch.match.home_team.displayed_name + " vs. " + ch.match.away_team.displayed_name + "<br>" if ch.match%></td></tr>
               <tr><td class='dialog-text'>Handicap:</td><td><%=point_spread(ch.match,ch.match.home_team) if ch.match%></td></tr>         
                           <%if ch.sender.bet(ch.match)%>
			      <tr><td class='dialog-text'><%=fb_name ch.sender%> bet:</td><td><%=ch.sender.bet(ch.match).team.displayed_name%></td></tr>
                           <%end%>
                           <%if ch.goter.bet(ch.match)%>
			      <tr><td class='dialog-text'><%=fb_name ch.goter%> bet:</td><td><%=ch.goter.bet(ch.match).team.displayed_name%></td></tr>
                           <%end%>
			   <tr><td class='dialog-text'>Amount:</td><td> <%=ch.amount%> WinPoints </td></tr>
			   <tr><td class='dialog-text'>Message:</td><td> 
					<%=ch.message%>
			   </td></tr>
		   </table>
       </form>
    <%end%>
 <%end%>
